============
SieveManager
============

Sieve_ is a programming language for filtering mail. Sieve scripts are run
on the mail server when mail is delivered to an inbox. So they have to be
uploaded to the mail server; this is what SieveManager is for.

SieveManager is a command-line for uploading, downloading, and managing
remote Sieve scripts using the ManageSieve protocol. It can also be used
as a Python module.

.. warning::
    SieveManager is a work-in-progress. The command-line interface,
    the configuration semantics, and the Python API are subject to change.
    And it's probably buggy around the edges.


EXAMPLE
=======

Upload and activate a Sieve script:

.. code:: none

    $ sievemgr user@imap.foo.example
    sieve://user@imap.foo.example> put script.sieve
    sieve://user@imap.foo.example> activate script.sieve

In Python:

.. code:: python

    from sievemgr import SieveManager

    with SieveManager('imap.foo.example', 'user', 'password') as mgr:
        with open('sieve.script', 'br') as script:
            mgr.putscript(script, script.name)
        mgr.setactive('sieve.script')


FEATURES
========

* Full compliance with :rfc:`5804` (ManageSieve protocol)

* Automated logins (using password managers,
  password files, or `.netrc <netrc_>`_)

* Automatic backups

* Tab-completion

* Scriptable

* CRAM-MD5, EXTERNAL, LOGIN, PLAIN, SCRAM-SHA-\*,
  SCRAM-SHA-\*-PLUS, [#untested]_ SCRAM-SHA3-512, and
  SCRAM-SHA3-512-PLUS [#untested]_ authentication

* Proxy authentication

* TLS `Server Name Indication`_

* Checks whether TLS certificates have been revoked
  (using lightweight OCSP_)

* TLS client authentication

* IPv6 addresses

.. [#untested] Untested.


.. toctree::
   :hidden:
   :titlesonly:

   install
   sievemgr
   sieve.cf
   module
   security
   feedback
   contrib
   Change log <changelog>
   Licence <licence>
   genindex
